


cmake_minimum_required(VERSION 3.0)

# project(public_module)
# project(socket_test_module)
project(io_reuse_module)

add_definitions(-g -Wall -Wshadow)

set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

set(open_libs gtest_main gtest)

set(IO_EPOLL_TEST_SRC_LIST ./io_epoll_test.cpp
						   ./test_util.cpp
						   ./../io_epoll.cpp
						   ./../io_reuse_module.cpp
						   ./../io_poll.cpp
						   ./../../socket_module/socket_buffer.cpp
						   ./../../socket_module/socket.cpp
						   ./../../write_read_module/buffer.cpp
)

set(IO_POLL_TEST_SRC_LIST  ./io_poll_test.cpp
						   ./test_util.cpp
						   ./../io_poll.cpp
						   ./../io_epoll.cpp
						   ./../io_reuse_module.cpp
						   ./../../socket_module/socket.cpp
						   ./../../socket_module/socket_buffer.cpp
						   ./../../write_read_module/buffer.cpp
)

set(MODULE_TEST_SRC_LIST   ./module_test.cpp
						   ./test_util.cpp
						   ./../io_reuse_module.cpp
						   ./../io_epoll.cpp
						   ./../io_poll.cpp
						   ./../../socket_module/socket.cpp
						   ./../../socket_module/socket_buffer.cpp
        ./../../write_read_module/buffer.cpp)

add_executable(GTEST_IO_EPOLL_TEST ${IO_EPOLL_TEST_SRC_LIST})
add_executable(GTEST_IO_POLL_TEST  ${IO_POLL_TEST_SRC_LIST})
add_executable(GTEST_MODULE_TEST   ${MODULE_TEST_SRC_LIST})

target_link_libraries(GTEST_IO_EPOLL_TEST    ${open_libs})
target_link_libraries(GTEST_IO_POLL_TEST     ${open_libs})
target_link_libraries(GTEST_MODULE_TEST      ${open_libs})


